function abc()
{if(document.frm_search.method.value!='Product')
{document.getElementById("search_gia").style.display='none';document.getElementById("bgContent").style.height='10px';}
else
{document.getElementById("search_gia").style.display='block';document.getElementById("bgContent").style.height='100px';}}
function addLike($thing_id)
{if(window.XMLHttpRequest)
{xmlhttp=new XMLHttpRequest();}
else
{xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");}
xmlhttp.onreadystatechange=function()
{if(xmlhttp.readyState==4&&xmlhttp.status==200)
{document.getElementById("num_like").innerHTML=xmlhttp.responseText;}}
xmlhttp.open("GET","/descriptionthing/descriptionthing/countlike?thing_id="+$thing_id,true);xmlhttp.send();}
function display()
{document.getElementById("btn_pre").style.visibility='visible';document.getElementById("btn_next").style.visibility='visible';}
function notdisplay()
{document.getElementById("btn_pre").style.visibility='hidden';document.getElementById("btn_next").style.visibility='hidden';}
function change_display(id)
{var img="bonus_img"+id;var div="div_"+id;var old_div="div_"+document.getElementById("number_img").value;document.getElementById(old_div).style.borderColor="white";document.getElementById("image_product").src=document.getElementById(img).src;document.getElementById(div).style.borderColor="red";document.getElementById("number_img").value=id;}
function change_display_arrow(kind)
{var id=document.getElementById("number_img").value;var count=document.getElementById("count_number_img").value;if(kind==1)
id=parseInt(id)-1;else
id=parseInt(id)+1;if(id==-1)
id=count-1;if(id==count)
id=0;change_display(id);}
function addCart(id)
{if(window.XMLHttpRequest)
{xmlhttp=new XMLHttpRequest();}
else
{xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");}
xmlhttp.onreadystatechange=function()
{if(xmlhttp.readyState==4&&xmlhttp.status==200)
{window.top.location.reload();document.getElementById("CartModule").innerHTML=$.parseJSON(xmlhttp.responseText);}}
xmlhttp.open("GET","/productdetail/productdetail/addcart?AddCart="+id,true);xmlhttp.send();}